package org.yefei.homeworkday08;

public class ArraysSix {

	public static void main(String[] args) {
		// 1:输出1-10000以内所有的质数并统计个数
		int j = 0, k;
		for (int i = 2; i < 10000; i++) {
			for (k = 2; i % k != 0 && k * k < i; k++)
				;
			if (k * k > i) {
				j++;
				System.out.println(i);

			}
		}
		System.out.println("共有:" + j + "个质数");

	}
}